var express = require("express");
var router = express.Router();

router.get("/", function (req, res, next) {
    //res.send("json")
    res.render('home',{data:getDada()})
});


function getDada() {
    var user = new Object();
    user.id = 123;
    user.name = "yake";
    user.password = "yake pass";
    user.age = 18;
    user.addree = "yake@163.com";

    var list = [user, user, user, user, user, user, user, user, user];

    var ss = new Object();
    ss.code = 200;
    ss.mess = "success";
    ss.data = list;
    return ss;
}


module.exports = router;